Open
Conversation
02ed221 to
38d72ca
Compare
Author
|
@FelixHuang18 could you have a look over this PR? |
|
@georgflick when I have multiple LiDARs in config file, it will create multiple nodes with the same name as the name of node will be set as the name of the container. How can I solve it? from launch import LaunchDescription
from launch_ros.actions import LoadComposableNodes
from launch_ros.descriptions import ComposableNode
from ament_index_python.packages import get_package_share_directory
import os
def generate_launch_description():
config_file = os.path.join(get_package_share_directory('rslidar_sdk'), 'config', 'robosense_config.yaml')
rslidar_component = ComposableNode(
package='rslidar_sdk',
plugin='robosense::lidar::RSLidarSDKComponent',
name='rslidar_node',
parameters=[{
'config_path': config_file,
}]
)
loader = LoadComposableNodes(
target_container='pointcloud_container',
composable_node_descriptions=[rslidar_component]
)
return LaunchDescription([loader]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adding ROS2 component with launcher
How-To-Test:
Manually:
ros2 run rclcpp_components component_container --ros-args -r __node:=component_containerros2 component load /component_container rslidar_sdk robosense::lidar::RSLidarSDKComponentLauncher:
ros2 launch rslidar_sdk start_component.launch.py